home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / misc / alltt.sty < prev    next >
Text File  |  1993-04-01  |  1KB  |  33 lines

  1. % ALLTT DOCUMENT-STYLE OPTION - released 17 December 1987
  2. %    for LaTeX version 2.09
  3. % Copyright (C) 1987 by Leslie Lamport
  4.  
  5. % Defines the `alltt' environment, which is like the `verbatim'
  6. % environment except that `\', `\{', and `\}' have their usual meanings.
  7. % Thus, other commands and environemnts can appear within an `alltt'
  8. % environment.  Here are some things you may want to do in an `alltt'
  9. % environment:
  10. % * Change fonts--e.g., by typing `{\em empasized text\/}'.
  11. % * Insert text from a file foo.tex by typing `input{foo}'.  Beware that
  12. %   each <return> stars a new line, so if foo.tex ends with a <return>
  13. %   you can wind up with an extra blank line if you're not careful.
  14. % * Insert a math formula.  Note that `$' just produces a dollar sign,
  15. %   so you'll have to type `\(...\)' or `\[...\]'.  Also, `^' and `_'
  16. %   just produce their characters; use `\sp' or `\sb' for super- and
  17. %   subscripts, as in `\(x\sp{2}\)'.
  18.  
  19. \def\docspecials{\do\ \do\$\do\&%
  20.   \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~}
  21.  
  22. \def\alltt{\trivlist \item[]\if@minipage\else\vskip\parskip\fi
  23. \leftskip\@totalleftmargin\rightskip\z@
  24. \parindent\z@\parfillskip\@flushglue\parskip\z@
  25. \@tempswafalse \def\par{\if@tempswa\hbox{}\fi\@tempswatrue\@@par}
  26. \obeylines \tt \catcode``=13 \@noligs \let\do\@makeother \docspecials
  27.  \frenchspacing\@vobeyspaces}
  28.  
  29. \let\endalltt=\endtrivlist
  30.